<h1><%= @character.name %></h1>

<ul>
<li><b>Race: </b><%= @character.race.name %></li>
<li><b>Class: </b><%= @character.chrclass.name %></li>
</ul>

<h2> <b><%= @character.item_drops.count %> Item Drops: </h2>
  <%= if @character.item_drops.count > 0
            render( :partial => "item_drops", :object => @character.item_drops) 
      end      
      %>
     

  <p/>
  <h2> Attended Raids </h2>
    <table>
    <thead>
       <tr>
         <th>Raid</th>
         <th>Date</th>
         <th>Attended Hours</th>
       </tr>
    </thead>
    <tbody>
        <% for a in @character.attendances %>
            <tr>
                <% if a.raid %>
    	       <td><%= link_to a.raid.name, :controller => "raids", :action => "show", :id => a.raid.id %></td>
    	       <td><%= datestamp(a.jointime) %></td>
    	       <td><%= timediff(a.jointime, a.leavetime) %>
    	       <% else %>
    	       <td><%= "Error with raid: " + debug(a) %>
    	       <% end %>
	       </tr>
	   <% end %>
	</tbody>
  </table>
